package com.itheima.sso.controller;

import com.itheima.model.common.dtos.ResponseResult;
import com.itheima.model.common.pojos.User;
import com.itheima.sso.service.SSOService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping("/admin")
@RestController
public class SSOController {

    @Autowired
    private SSOService ssoService;

    /**
     * 登录
     */
    @PostMapping("/login")
    public ResponseResult login(@RequestBody User user) {
        return ssoService.login(user);
    }
}
